<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        //依次打印数组中的每个元素 遍历
        /* var arr = [1, '好天气', '穿甲', 4];
        for (var i = 0; i < 4; i++){
            console.log(arr[i]);
        } */

        var arr = [1, '好天气', '穿甲', 4];
        for (var i = 0; i < arr.length; i++){
            console.log(arr[i]);
        }
    </script>
</body>
</html>